#!/bin/sh

# Abort on any errors
set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo Clearing Solr indexes...
curl -s -H "Content-Type:application/xml" -d @$DIR/clearcache.xml http://localhost/solr/categorySearch/update?commit=true &>/dev/null
curl -s -H "Content-Type:application/xml" -d @$DIR/clearcache.xml http://localhost/solr/gadgetSearch/update?commit=true &>/dev/null
echo Done.